<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SA-PCB: module/KicadParser/src/kicadPcbDataBase.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SA-PCB
   </div>
   <div id="projectbrief">Annealing-basedPCBplacementtool</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_a7b0466279106ea0b8f86f609f621680.html">module</a></li><li class="navelem"><a class="el" href="dir_bb0da232e2f82126cc254cedc59977c5.html">KicadParser</a></li><li class="navelem"><a class="el" href="dir_3f13d50a055a40a0b7f5ff3f83ace49c.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">kicadPcbDataBase.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef KICAD_PCB_KICADPCB_DATABASE_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define KICAD_PCB_KICADPCB_DATABASE_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;iterator&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;kicadParser.h&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;module.h&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;net.h&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;object.h&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;pin.h&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;segment.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;tree.h&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;util.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;via.h&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;shape.h&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;layer.h&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classkicad_pcb_data_base.html">   27</a></span>&#160;<span class="keyword">class </span><a class="code" href="classkicad_pcb_data_base.html">kicadPcbDataBase</a></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="classkicad_pcb_data_base.html">kicadPcbDataBase</a>(std::string fileName) : m_fileName(fileName)</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        std::cerr &lt;&lt; <span class="stringliteral">&quot;Build Kicad Pcb database...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordflow">if</span> (!buildKicadPcb())</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            std::cerr &lt;&lt; <span class="stringliteral">&quot;ERROR: Building Kicad Pcb database failed.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            assert(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    };</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    ~<a class="code" href="classkicad_pcb_data_base.html">kicadPcbDataBase</a>(){};</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">void</span> printLayer();</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">void</span> printNet();</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordtype">void</span> printInst();</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordtype">void</span> printComp();</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordtype">void</span> printNetclass();</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordtype">void</span> printPcbRouterInfo();</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">void</span> printFile();</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">void</span> printSegment();</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordtype">void</span> printUnconnectedPins();</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">void</span> printKiCad(<span class="keyword">const</span> std::string folderName = <span class="stringliteral">&quot;&quot;</span>, <span class="keyword">const</span> std::string fileNameStamp = <span class="stringliteral">&quot;&quot;</span>, <span class="keyword">const</span> std::string fileName = <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordtype">void</span> printNodes();</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordtype">void</span> printLockedInst();</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">void</span> printDesignStatistics();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">void</span> printRoutedSegmentsWLAndNumVias();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">bool</span> buildKicadPcb();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> removeRoutedSegmentsAndVias();</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">bool</span> getPcbRouterInfo(std::vector&lt;std::set&lt;std::pair&lt;double, double&gt; &gt; &gt; *);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordtype">bool</span> getPinPosition(<span class="keyword">const</span> std::string &amp;inst_name, <span class="keyword">const</span> std::string &amp;pin_name, <a class="code" href="class_point__2_d.html">point_2d</a> *pos);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">bool</span> getPinPosition(<span class="keyword">const</span> <span class="keywordtype">int</span> inst_id, <span class="keyword">const</span> <span class="keywordtype">int</span> &amp;pin_id, <a class="code" href="class_point__2_d.html">point_2d</a> *pos);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordtype">void</span> getPinPosition(<span class="keyword">const</span> <a class="code" href="classpadstack.html">padstack</a> &amp;, <span class="keyword">const</span> <a class="code" href="classinstance.html">instance</a> &amp;, <a class="code" href="class_point__2_d.html">point_2d</a> *pos);</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordtype">void</span> getPinShapeRelativeCoordsToModule(<span class="keyword">const</span> <a class="code" href="classpadstack.html">padstack</a> &amp;<a class="code" href="structpad.html">pad</a>, <span class="keyword">const</span> <a class="code" href="classinstance.html">instance</a> &amp;inst, <span class="keyword">const</span> points_2d &amp;coords, points_2d *coordsRe);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordtype">bool</span> getPinPosition(<span class="keyword">const</span> <a class="code" href="class_pin.html">Pin</a> &amp;p, <a class="code" href="class_point__2_d.html">point_2d</a> *pos);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordtype">bool</span> getCompBBox(<span class="keyword">const</span> <span class="keywordtype">int</span> compId, <a class="code" href="class_point__2_d.html">point_2d</a> *bBox);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    std::vector&lt;int&gt; getPinLayer(<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;instId, <span class="keyword">const</span> <span class="keywordtype">int</span> &amp;padStackId);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="comment">// TODO:: Move this to instance or overloaded this to Instance</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordtype">void</span> getPadstackRotatedWidthAndHeight(<span class="keyword">const</span> <a class="code" href="classinstance.html">instance</a> &amp;inst, <span class="keyword">const</span> <a class="code" href="classpadstack.html">padstack</a> &amp;<a class="code" href="structpad.html">pad</a>, <span class="keywordtype">double</span> &amp;width, <span class="keywordtype">double</span> &amp;height);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordtype">bool</span> getInstance(<span class="keyword">const</span> std::string &amp;, <a class="code" href="classinstance.html">instance</a> *&amp;);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">bool</span> getComponent(<span class="keyword">const</span> std::string &amp;, <a class="code" href="classcomponent.html">component</a> *&amp;);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordtype">bool</span> getNet(<span class="keyword">const</span> std::string &amp;, <a class="code" href="classnet.html">net</a> *&amp;);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <a class="code" href="classcomponent.html">component</a> &amp;getComponent(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> components.at(<span class="keywordtype">id</span>); }</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <a class="code" href="classinstance.html">instance</a> &amp;getInstance(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> instances.at(<span class="keywordtype">id</span>); }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <a class="code" href="classnet.html">net</a> &amp;getNet(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> nets.at(<span class="keywordtype">id</span>); }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="classnetclass.html">netclass</a> &amp;getNetclass(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> netclasses.at(<span class="keywordtype">id</span>); }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    std::string getFileName() { <span class="keywordflow">return</span> m_fileName; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    std::vector&lt;instance&gt; &amp;getInstances() { <span class="keywordflow">return</span> instances; }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    std::vector&lt;component&gt; &amp;getComponents() { <span class="keywordflow">return</span> components; }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    std::vector&lt;net&gt; &amp;getNets() { <span class="keywordflow">return</span> nets; }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    std::vector&lt;Pin&gt; &amp;getUnconnectedPins() { <span class="keywordflow">return</span> unconnectedPins; }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    std::vector&lt;netclass&gt; &amp;getNetclasses() { <span class="keywordflow">return</span> netclasses; }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordtype">bool</span> isInstanceId(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> <span class="keywordtype">id</span> &lt; instances.size() ? true : <span class="keyword">false</span>; }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordtype">bool</span> isComponentId(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> <span class="keywordtype">id</span> &lt; components.size() ? true : <span class="keyword">false</span>; }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordtype">bool</span> isNetId(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> <span class="keywordtype">id</span> &lt; nets.size() ? true : <span class="keyword">false</span>; }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordtype">bool</span> isNetclassId(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> <span class="keywordtype">id</span> &lt; netclasses.size() ? true : <span class="keyword">false</span>; }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="comment">// TODO: All layers are copper in the &quot;layer_to_index_map&quot; and &quot;index_to_layer_map&quot;</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordtype">int</span> getNumCopperLayers() { <span class="keywordflow">return</span> index_to_layer_map.size(); }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordtype">int</span> getLayerId(<span class="keyword">const</span> std::string &amp;layerName);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    std::string getLayerName(<span class="keyword">const</span> <span class="keywordtype">int</span> layerId);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    std::map&lt;int, std::string&gt; &amp;getCopperLayers() { <span class="keywordflow">return</span> index_to_layer_map; }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordtype">bool</span> isCopperLayer(<span class="keyword">const</span> <span class="keywordtype">int</span>);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordtype">bool</span> isCopperLayer(<span class="keyword">const</span> std::string &amp;);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="comment">// TODO: Get design boundary based on rotated pin shape</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">void</span> getBoardBoundaryByPinLocation(<span class="keywordtype">double</span> &amp;minX, <span class="keywordtype">double</span> &amp;maxX, <span class="keywordtype">double</span> &amp;minY, <span class="keywordtype">double</span> &amp;maxY);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="comment">//[[deprecated]] points_2d &amp;getBoardBoundary() { return m_boundary; } </span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordtype">void</span> addClearanceDrc(<a class="code" href="class_object.html">Object</a> &amp;obj1, <a class="code" href="class_object.html">Object</a> &amp;obj2);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordtype">void</span> getBoardBoundaryByEdgeCuts(<span class="keywordtype">double</span> &amp;minX, <span class="keywordtype">double</span> &amp;maxX, <span class="keywordtype">double</span> &amp;minY, <span class="keywordtype">double</span> &amp;maxY);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordtype">void</span> printClearanceDrc();</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordtype">int</span> getInstancesCount() { <span class="keywordflow">return</span> instances.size(); }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordtype">double</span> getLargestClearance();</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordtype">void</span> testInstAngle();</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <a class="code" href="classnet.html">net</a> &amp;getNet(<span class="keyword">const</span> std::string &amp;);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="comment">// Input</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    std::string m_fileName;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="comment">// Index map</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    std::unordered_map&lt;std::string, int&gt; layer_to_index_map;   <span class="comment">//&lt;layer name, layer id&gt;</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    std::map&lt;int, std::string&gt; index_to_layer_map;             <span class="comment">//&lt;layer id, layer name&gt;</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    std::unordered_map&lt;std::string, int&gt; net_name_to_id;       <span class="comment">//&lt;net name, net id&gt;</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    std::unordered_map&lt;int, std::string&gt; net_id_to_name;       <span class="comment">//&lt;net id, net name&gt;</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    std::unordered_map&lt;std::string, int&gt; instance_name_to_id;  <span class="comment">//&lt;instance name, instance int&gt;</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    std::unordered_map&lt;std::string, int&gt; component_name_to_id; <span class="comment">//&lt;component name, component int&gt;</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="comment">//Drc</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    std::vector&lt;std::pair&lt;Object, Object&gt; &gt; clearanceDrcs;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">// Object Instances</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    std::vector&lt;instance&gt; instances;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    std::vector&lt;component&gt; components;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    std::vector&lt;net&gt; nets;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    std::vector&lt;netclass&gt; netclasses;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    std::vector&lt;line&gt; boundaryLines;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    points_2d m_boundary; <span class="comment">//(minx,miny) (maxx,maxy)</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="comment">// Keepouts</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    std::map&lt;std::string, paths&gt; layer_to_keepout_map; <span class="comment">// keepout zones &lt;layer name, polygon&gt;</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    paths all_keepouts;                                <span class="comment">// All keepout zones in polygon</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    std::vector&lt;Pin&gt; unconnectedPins;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="comment">// TODO: Move to Net Instance and Consider the usage of DRC checking</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    std::map&lt;int, paths&gt; net_to_segments_map;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="comment">// TODO: Refactor this</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="comment">// Reorganized for router</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    std::vector&lt;pad&gt; all_pads; <span class="comment">// unconnected pins</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    std::vector&lt;track&gt; the_tracks;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="comment">// For differential pair lookup</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    std::map&lt;std::string, std::pair&lt;int, int&gt; &gt; name_to_diff_pair_net_map; <span class="comment">// &lt;net name, &lt;netId1, netId2&gt;&gt;</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="comment">// Misc.</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="struct_tree.html">Tree</a> tree;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;};</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasspadstack_html"><div class="ttname"><a href="classpadstack.html">padstack</a></div><div class="ttdef"><b>Definition:</b> pin.h:59</div></div>
<div class="ttc" id="aclasscomponent_html"><div class="ttname"><a href="classcomponent.html">component</a></div><div class="ttdef"><b>Definition:</b> module.h:12</div></div>
<div class="ttc" id="aclassnetclass_html"><div class="ttname"><a href="classnetclass.html">netclass</a></div><div class="ttdef"><b>Definition:</b> net.h:32</div></div>
<div class="ttc" id="aclassinstance_html"><div class="ttname"><a href="classinstance.html">instance</a></div><div class="ttdef"><b>Definition:</b> module.h:102</div></div>
<div class="ttc" id="aclasskicad_pcb_data_base_html"><div class="ttname"><a href="classkicad_pcb_data_base.html">kicadPcbDataBase</a></div><div class="ttdef"><b>Definition:</b> kicadPcbDataBase.h:27</div></div>
<div class="ttc" id="aclass_point__2_d_html"><div class="ttname"><a href="class_point__2_d.html">Point_2D&lt; double &gt;</a></div></div>
<div class="ttc" id="astructpad_html"><div class="ttname"><a href="structpad.html">pad</a></div><div class="ttdef"><b>Definition:</b> pin.h:45</div></div>
<div class="ttc" id="aclass_object_html"><div class="ttname"><a href="class_object.html">Object</a></div><div class="ttdef"><b>Definition:</b> object.h:21</div></div>
<div class="ttc" id="aclass_pin_html"><div class="ttname"><a href="class_pin.html">Pin</a></div><div class="ttdef"><b>Definition:</b> pin.h:18</div></div>
<div class="ttc" id="aclassnet_html"><div class="ttname"><a href="classnet.html">net</a></div><div class="ttdef"><b>Definition:</b> net.h:68</div></div>
<div class="ttc" id="astruct_tree_html"><div class="ttname"><a href="struct_tree.html">Tree</a></div><div class="ttdef"><b>Definition:</b> tree.h:7</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
